<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./06-rem适配.css" />
  </head>
  <body>
    <div id="box"></div>

    <script>
      // 动态计算根标签的字体大小
      const fontSize = document.documentElement.clientWidth / 10

      document.documentElement.style.fontSize = fontSize + 'px'
    </script>
  </body>
</html>
